package com.zhang.mapper;

import com.zhang.entity.BugRegister;
import com.zhang.entity.dto.QueryBugDto;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @author 张
 * @description 针对表【bug_register(故障记录表)】的数据库操作Mapper
 * @createDate 2024-05-23 19:34:40
 * @Entity com.zhang.entity.BugRegister
 */
@Mapper
@Transactional(rollbackFor = Exception.class)
public interface BugRegisterMapper {
    public int addBugMessage(BugRegister bugRegister);
    public List<BugRegister> queryBugMessage(QueryBugDto queryBugDto);
    @Update("update visions_sort.bug_register set version = #{version} where id = #{bugId}")
    public boolean changeBugVersion(@Param("bugId") Integer bugId,@Param("version") Integer version);
}
